/*
 * @Description:
 * @Version: 2.0
 * @Autor: kafei
 * @Date: 2021-11-18 15:41:25
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-01-11 10:35:55
 */
import request from '@/utils/request'

export function login (data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export function theme (data) {
  return request({
    url: '/api/theme',
    method: 'post',
    data
  })
}

export function register (data) {
  return request({
    url: '/api/register',
    method: 'post',
    data
  })
}

export function userInfo (data) {
  return request({
    url: '/api/userInfo',
    method: 'get'
  })
}

export function role (params) {
  // {
  //   role: data
  // }
  return request({
    url: '/api/role',
    method: 'get',
    params
  })
}
